home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 88 / 088.d81 / 1000 miler (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  11KB  |  371 lines

  1. 10 dv=peek(186):ifdv<8thendv=8
  2. 20 print"[147]":qq=rnd(-ti)
  3. 30 dimb$(106),c$(106),a$(7,2),s%(8,2),h%(8,2)
  4. 32 poke53281,0:poke53280,0
  5. 34 print"[147][129]          1 0 0 0    [205] [201] [204] [197] [210]
  6. 36 [153]"open   by (NULL)aren (NULL)iddaugh and atnlan chr$ardner"
  7. 38 [141]60000
  8. 40 [151]214,7:[153]:[153]"         clr(NULL) (NULL) atn str$ right$ (NULL) chr$ . . ."
  9. 41 [139][194](787)[178]253[167]46
  10. 42 [158]57812"mb.4000",dv,0:[151]780,0:[151]781,0:[151]782,64:[158]65493
  11. 44 [158]57812"mb.c000",dv,0:[151]780,0:[151]781,0:[151]782,192:[158]65493
  12. 45 [151]787,253
  13. 46 [153]"on   1cont.  (NULL)ne player against computer"
  14. 48 [153]"   2cont.  (NULL)wo players against each other"
  15. 50 [153]"   3cont.  (NULL)uit to (NULL)(NULL)atnstr$(NULL)(NULL)atn(NULL)
  16. 52 getk$:ifk$<"1"ork$>"3"then52
  17. 54 ifk$="3"then2900
  18. 56 np=val(k$)
  19. 60 poke249,224:poke250,204:poke251,0:poke252,64:poke253,0:poke254,0
  20. 70 poke255,0:sys51462:sys51459
  21. 80 :
  22. 90 te=50759:sp$="[160]                                    ":s=54272
  23. 92 forx=stos+24:pokex,.:next:pokes+24,15
  24. 100 p1=1:p2=2:co=1:zy=1
  25. 110 :
  26. 120 s%(5,1)=1:s%(5,2)=1
  27. 130 fori=1to106:readb$(i):next:zz=106:gosub1150:poke53280,6
  28. 140 sh=48:xp=2:yp=0:gosub2220
  29. 150 syste,"200",267,25:syste,"200",267,137
  30. 160 syste,"0000",136,57:syste,"0000",136,169
  31. 170 fori=1to2:xx(i)=93:ml(i)=0
  32. 180 sl(i)=200:h%(2,i)=1:p(i)=1:m$(i)="000"
  33. 190 forl=1to6:a$(l,i)=c$(co):co=co+1:next:forl=1to6
  34. 200 ifleft$(a$(l,i),1)<>"3"then230
  35. 210 lf=val(mid$(a$(l,i),2,1)):s%(lf,i)=1:gosub1940
  36. 220 a$(l,i)=c$(co):co=co+1:goto200
  37. 230 next:p1=2
  38. 240 sh=46:xp=2:yp=0:gosub2220:sh=49:yp=14:gosub2220
  39. 250 next
  40. 260 p1=1
  41. 270 sh=47:xp=2:yp=14:gosub2220:sh=48:yp=0:gosub2220
  42. 280 a$(7,p1)=c$(co):gosub1130:ifleft$(a$(7,p1),1)<>"3"then300
  43. 290 lf=val(mid$(a$(7,p1),2,1)):s%(lf,p1)=1:l=6:gosub1940:goto280
  44. 300 ifp1=2andnp=1then550
  45. 310 ifnp=2thensyste,"hit any key to view cards",7*8,104:poke198,0:wait198,1:poke198,0
  46. 320 syste,sp$,16,104:gosub1790
  47. 330 syste,"(d)iscard  (p)lay card  (q)uit",4*8,104
  48. 340 gosub2190:syste,sp$,16,104
  49. 350 ifx$<>"p"andx$<>"q"andx$<>"d"then330
  50. 360 ifx$="q"then2080
  51. 370 syste,"which one (1-7) or 0 to end",4*8,104
  52. 380 poke198,0:wait198,1:gety$:syste,sp$,16,104
  53. 390 y=val(y$):remgetoffwhichone?
  54. 400 ify>7ory<1then330
  55. 410 gosub1820:ifx$<>"d"then430
  56. 420 b$(zy)=a$(y,p1):zy=zy+1:gosub700:goto650
  57. 430 le$=left$(a$(y,p1),1):lf=val(mid$(a$(y,p1),2,1))
  58. 440 fl=0:ifle$="4"andp(p1)=0andlf*25<=sl(p1)andml(p1)+lf*25<1001thenfl=1
  59. 450 iffl=1thenforl=1tolf:gosub1850:next:gosub700:goto650
  60. 460 fl=0:ifle$="1"andp(p2)=0ands%(lf,p2)=0thenfl=1
  61. 470 ifle$="1"andp(p2)=0ands%(2,p2)=0andlf=5andsl(p2)=200thenfl=1
  62. 480 iffl=1thenh%(lf,p2)=1:onlfgosub1470,1380,1550,1300,1630
  63. 490 iffl=1thengosub700:goto650
  64. 500 fl=0:ifle$="2"andh%(lf,p1)=1andlf<5thenfl=1
  65. 510 ifle$="2"andlf=5andh%(5,p1)=1andp(p1)=0thenfl=1
  66. 520 iffl=1thenh%(lf,p1)=0:onlfgosub1510,1420,1590,1340,1710
  67. 530 iffl=1thengosub700:goto650
  68. 540 fora=1to20:poke54296,.:poke54296,15:next:goto320
  69. 550 q=0:ifml(p2)-ml(p1)>299thengosub720:gosub800:gosub890:goto970
  70. 560 fl=0:ifp(p1)=1andml(p2)<701andml(p2)-ml(p1)<210thenfl=1
  71. 570 iffl=1thengosub890:gosub720:goto970
  72. 580 fl=0:ifp(p1)=1and(ml(p2)>700orml(p2)-ml(p1)>200)thenfl=1
  73. 590 iffl=1thengosub720:gosub890:goto970
  74. 600 fl=0:ifsl(p1)=75andml(p2)<801andml(p1)-ml(p2)>150thenfl=1
  75. 610 iffl=1thengosub890:gosub800:gosub720:goto970
  76. 620 fl=0:ifsl(p1)=75andml(p2)-ml(p1)>100thenfl=1
  77. 630 iffl=1thengosub720:gosub800:gosub890:goto970
  78. 640 gosub800:gosub720:gosub890:goto970
  79. 650 ifml(p1)=1000then2290:remwinner
  80. 660 ifp1=1thenp1=2:p2=1:sh=46:xp=2:yp=0:gosub2220:sh=49:yp=14:gosub2220:goto280
  81. 670 p1=1:p2=2
  82. 680 sh=47:xp=2:yp=14:gosub2220:sh=48:yp=0:gosub2220
  83. 690 goto280
  84. 700 a$(y,p1)=a$(7,p1):sh=40:xp=32:yp=11:gosub2220
  85. 710 return
  86. 720 ifp(p2)=1orq=1thenreturn
  87. 730 fory=1to7
  88. 740 lf=val(mid$(a$(y,p1),2,1)):fl=0
  89. 750 ifleft$(a$(y,p1),1)="1"ands%(lf,p2)=0thenfl=1
  90. 760 ifleft$(a$(y,p1),1)="1"andlf=5andsl(p2)=200ands%(2,p2)=0thenfl=1
  91. 770 iffl=1thenh%(lf,p2)=1:onlfgosub1470,1380,1550,1300,1630
  92. 780 iffl=1thenq=1:return
  93. 790 next:return
  94. 800 ifp(p1)=1orq=1thenreturn
  95. 810 hm=0:fory=1to7
  96. 820 lf=val(mid$(a$(y,p1),2,1))
  97. 830 ifleft$(a$(y,p1),1)="4"andlf*25<=sl(p1)then850
  98. 840 next:goto870
  99. 850 iflf*25>hm*25andml(p1)+lf*25<1001thenhm=lf:hc=y
  100. 860 goto840
  101. 870 ifhm=0thenreturn
  102. 880 forl=1tohm:gosub1850:next:y=hc:q=1:return
  103. 890 ifq=1thenreturn
  104. 900 fory=1to7
  105. 910 lf=val(mid$(a$(y,p1),2,1)):fl=0
  106. 920 ifleft$(a$(y,p1),1)="2"andh%(lf,p1)=1andlf<5thenfl=1
  107. 930 ifleft$(a$(y,p1),1)="2"andlf=5andh%(5,p1)=1andp(p1)=0thenfl=1
  108. 940 iffl=1thenh%(lf,p1)=0:onlfgosub1510,1420,1590,1340,1710
  109. 950 iffl=1thenq=1:return
  110. 960 next:return
  111. 970 ifq=1then1120
  112. 980 fory=1to7:lf=val(mid$(a$(y,p1),2,1))
  113. 990 ifleft$(a$(y,p1),1)="2"ands%(lf,p1)=1then1110
  114. 1000 next:fory=1to7:lf=val(mid$(a$(y,p1),2,1))
  115. 1010 ifleft$(a$(y,p1),1)="1"ands%(lf,p2)=1then1110
  116. 1020 next:fory=1to7:forx=1to7
  117. 1030 ifa$(y,p1)=a$(x,p1)thennc=nc+1
  118. 1040 next:ifnc>2thennc=0:goto1110
  119. 1050 nc=0:next:nc=0:fory=1to7
  120. 1060 ifleft$(a$(y,p1),1)="4"andval(mid$(a$(y,p1),2,1))*25<101then1110
  121. 1070 next:fory=1to7:forx=1to7
  122. 1080 ifa$(y,p1)=a$(x,p1)thennc=nc+1
  123. 1090 next:ifnc>1thennc=0:goto1110
  124. 1100 nc=0:next:nc=0:y=int(rnd(1)*7)+1
  125. 1110 b$(zy)=a$(y,p1):zy=zy+1
  126. 1120 gosub700:goto650
  127. 1130 co=co+1:ifco<>zz+1thenreturn
  128. 1140 zz=zy-1:zy=1:co=1
  129. 1150 syste,"shuffling the deck...",72,104
  130. 1152 fori=1tozz:r=int(rnd(0)*zz)+1
  131. 1170 ifb$(r)<>"1"thenc$(i)=b$(r):b$(r)="1":next:syste,sp$,16,104:return
  132. 1180 r=r+1:ifr=zz+1thenr=1
  133. 1190 goto1170
  134. 1200 data4841,1427,2331,3136,2133,4343,4442,1230
  135. 1210 data1128,2235,2534,4442,4343,2235,1529,4244,4145,1326,4343,4442,2534
  136. 1220 data2331,1529,4145,4244,4244,4841,2133,1230,3338,2331,4343,4442,2432
  137. 1230 data1529,2432,2331,2235,4244,4442,4343,4442,4145,4244,1529,1128
  138. 1240 data2534,3237,1326,2235,4343,4841,4442,4145,1230,4244,2432,3439
  139. 1250 data2534,2235,1128,4442,4343,2534,2133,4145,4244,4442,4343,2432
  140. 1260 data2534,2331,2235,1230,1427,2235,1326,2235,2235,4343,4442,2331
  141. 1270 data2235,2133,1230,4145,4841,4442,4343,2133,2235
  142. 1280 data4145,2235,2432,2133,4244,4145,4244,4442,4145,1427,2235,2432
  143. 1290 data4244,4145,2235
  144. 1300 rem******flattire******
  145. 1310 gosub1380:p(p2)=1
  146. 1320 xp=3:yp=3+(p2-1)*14:goto10000
  147. 1330 :
  148. 1340 rem*****fixtheflat*****
  149. 1350 gosub1420:p(p1)=0
  150. 1360 xp=3:yp=3+(p1-1)*14:goto10035
  151. 1370 :
  152. 1380 rem****redlight*****
  153. 1390 p(p2)=1:forx=stos+24:pokex,0:next:pokes+24,15:p(p2)=1:gosub10190
  154. 1400 xp=30:yp=2+(p2-1)*14:sh=1:gosub2220
  155. 1405 fordl=1to200:next
  156. 1410 return
  157. 1420 rem****grnlight*****
  158. 1422 foraa=1to4:ifh%(aa,p1)<>0thenreturn
  159. 1423 next
  160. 1430 p(p1)=0:forx=stos+24:pokex,0:next:pokes+24,15:p(p1)=0:gosub10205
  161. 1440 xp=30:yp=2+(p1-1)*14:sh=2:ifsl(p1)=75thensh=50
  162. 1450 gosub2220
  163. 1455 fordl=1to200:next
  164. 1460 return
  165. 1470 rem****accident****
  166. 1480 gosub1380:p(p2)=1
  167. 1490 xp=8:yp=5+(p2-1)*14:goto10125
  168. 1500 :
  169. 1510 rem*****repairs*****
  170. 1520 gosub1420:p(p1)=0
  171. 1530 xp=8:yp=5+(p1-1)*14:goto10160
  172. 1540 :
  173. 1550 rem****nogas*****
  174. 1560 gosub1380:p(p2)=1
  175. 1570 xp=8:yp=2+(p2-1)*14:goto10055
  176. 1580 :
  177. 1590 rem*****fillup*****
  178. 1600 gosub1420:p(p1)=0
  179. 1610 xp=8:yp=2+(p1-1)*14:goto10090
  180. 1620 :
  181. 1630 rem*****speedlimit****
  182. 1640 sl(p2)=75:sh=50:xp=30:yp=2+(p2-1)*14:gosub2220:pokes+5,0:pokes+6,0
  183. 1645 xp=267:yp=25+(p2-1)*112
  184. 1650 forsl=200to75step-5:sl$=mid$(str$(sl),2)
  185. 1655 pokes+1,sl:pokes+4,17:pokes+4,0
  186. 1660 iflen(sl$)<3thensl$=" "+sl$:goto1660
  187. 1670 syste,sl$,xp,yp:syste,"   ",xp,yp
  188. 1680 next
  189. 1690 syste," 75",xp,yp
  190. 1700 return
  191. 1710 rem****endlimit*****
  192. 1720 sl(p1)=200:sh=2:xp=30:yp=2+(p1-1)*14:gosub2220:pokes+5,0:pokes+6,0
  193. 1725 xp=267:yp=25+(p1-1)*112
  194. 1730 forsl=75to200step5:sl$=mid$(str$(sl),2)
  195. 1732 pokes+1,sl:pokes+4,17:pokes+4,0
  196. 1740 iflen(sl$)<3thensl$=" "+sl$:goto1740
  197. 1750 syste,sl$,xp,yp:syste,"   ",xp,yp
  198. 1760 next
  199. 1770 syste,"200",xp,yp:sh=2:xp=30:yp=2+(p1-1)*14:gosub2220
  200. 1780 return
  201. 1790 rem*****drawcardshere*****
  202. 1800 xp=2:yp=11:fori=1to7:sh=val(right$(a$(i,p1),2)):gosub2220:xp=xp+5:next
  203. 1810 return
  204. 1820 rem*****getcardsoff*****
  205. 1830 xp=2:yp=11:fori=1to7:sh=40:gosub2220:xp=xp+5:next
  206. 1840 return
  207. 1850 rem*****mileagebox*****
  208. 1860 ml(p1)=ml(p1)+25:m$(p1)=mid$(str$(ml(p1)),2)
  209. 1870 iflen(m$(p1))<=3thenm$(p1)="0"+m$(p1):goto1870
  210. 1880 xp=16:yp=0+(p1-1)*14:t=20:ifrnd(1)<.1thent=57
  211. 1882 ifml(p1)=1000thent=51
  212. 1884 forx=stos+24:pokex,.:next
  213. 1890 forsh=ttot+5:poke5